package com.boomsecret.pattern.singleton;

import org.junit.Test;

/**
 * Created by wangjinliang on 2018/1/17.
 */
public class SingletonPatternTest {

    @Test
    public void testLazySingletonPattern() {
        LazySingletonPattern instance = LazySingletonPattern.getInstance();
        instance.invokeMethod();
    }

    @Test
    public void testEnhanceLazySingletonPattern() {
        EnhanceLazySingletonPattern instance = EnhanceLazySingletonPattern.getInstance();
        instance.invokeMethod();
    }

    @Test
    public void testHungerSingletonPattern() {
        HungerSingletonPattern instance = HungerSingletonPattern.getInstance();
        instance.invokeMethod();
    }

    @Test
    public void testEnhanceHungerSingletonPattern() {
        EnhanceHungerSingletonPattern instance = EnhanceHungerSingletonPattern.getInstance();
        instance.invokeMethod();
    }
}
